<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>水果价格</title>
    <script>
        var fruit = prompt("请输入要查询的水果：");
        switch(fruit){
            case "苹果" :
                alert("苹果2元/斤");
                break;
            case "榴莲" :
                alert("榴莲10元/斤");
                break;
            case "香蕉" :
                alert("香蕉5元/斤");
                break;
            default:
                alert("没有此水果。");
                break;
        }
    </script>
</head>
<body>
    
</body>
</html>